/*
 * CArm.cpp
 *
 *      Author: Boboss
 */

#include "CArm.h"
CArm::CArm(int glLighting) {
	_manipulationBras = new osg::MatrixTransform;
	_pos = new osg::Vec3f;
	std::string model("./ressource/pince_robot.3ds");
	_arm = new CObject3d(0.f,0.f,0.f,0.f,model,0.3f);
	_manipulationBras->addChild(_arm->getNode());

}

#if CAVE == 0
void CArm::updatePosition(osg::Vec3 pos)
{
	_pos->x() = pos.x();
	_pos->y() = pos.y();
	_pos->z() = pos.z();
	_manipulationBras->setMatrix(osg::Matrix::translate(*_pos));
}
#else
void CArm::updatePosition(osg::Vec3 pos)
{
	_pos->x() = pos.x();
	_pos->y() = pos.y();
	_pos->z() = pos.z();
	_manipulationBras->setMatrix(osg::Matrix::translate(*_pos));
}
#endif

CArm::~CArm() {
	// TODO Auto-generated destructor stub
}
